﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;



namespace ZGameFramework.Resource
{
    public class ResourcesLoader : IResourceLoader
    {
        public void LoadAssetAsync<T>(string assetPath)where T:Object
        {
            ResourceRequest request = Resources.LoadAsync<T>( assetPath );

        } 

        public T LoadAssetSync<T>(string assetPath) where T:Object
        {
            T results = Resources.Load<T>(assetPath);
            return results;
        }

        public void UnloadAsset<T>(T t) where T:Object
        {
            Resources.UnloadAsset(t);
        }

        public void UnloadAssetAll()
        {
            Resources.UnloadUnusedAssets();
        }
    }
}
